package com.ruoyi.system.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.system.domain.Product;
import com.ruoyi.system.domain.ProductDto;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface ProductMapper extends BaseMapper<Product> {

    //查取全部商品
    List<ProductDto> selectAll(@Param("categoryId") Integer categoryId,
                               @Param("productId") Integer productId,
                               @Param("productName") String productName);

    //根据categoryId,productId,productName查商品
    List<Product> selectByDetail(@Param("categoryId") Integer categoryId,
                                     @Param("productId") Integer productId,
                                     @Param("productName") String productName);

    Product getAll(@Param("categoryId") Integer categoryId,
                                 @Param("productId") Integer productId,
                                 @Param("productName") String productName);
}
